/**
 * Copyright (c) 2006-2013 Las Venturas Mineground
 *
 * This program is free software: you can redistribute it and/or modify it under the terms of the
 * GNU General Public License as published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
 * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with this program.
 * If not, see <http://www.gnu.org/licenses/>.
 */

package org.mineground;

import org.bukkit.plugin.java.JavaPlugin;
import org.mineground.events.EventManager;

/**
 * The Mineground class is the primary runtime of the Las Venturas Mineground server. It owns the
 * various controllers and managers which, together, create the user experience we'd like to offer
 * to our players. This class is owned by {@link MinegroundPlugin}.
 */
public class Mineground {
    private final EventManager mEventManager = new EventManager();
    
    // TODO: Implement the Configuration class.
    // TODO: Implement the DatabaseConnection class.
    // TODO: Implement the IRCBot class.
    
    @SuppressWarnings("unused")
    private FeatureController mFeatureController;
    
    
    /**
     * Initiates a new Mineground runtime with the data we receive from the Bukkit instance. The
     * plugin is intentionally downcasted to a JavaPlugin, given that we do not want to care about
     * it being the MinegroundPlugin at this point.
     * 
     * @param javaPlugin The Java Plugin which owns this 
     */
    public Mineground(JavaPlugin plugin) {
        this.mEventManager.registerEvents(plugin);
        
        // TODO: Initialize the Configuration class.
        // TODO: Initialize the DatabaseConnection class.
        // TODO: Initialize the IRCBot class.
        
        mFeatureController = new FeatureController(/** mDatabaseConnection **/ null);
    }
}
